﻿using Sowrk03_28.Repository.Interface;
using Swork03_28.Domain.TraceableInfos;
using Swork03_28.Services.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Swork03_28.Services.Impls
{
    public class GoodsService : IGoodsService
    {
        private readonly IGoodsRepository goodsRepository;

        public GoodsService(IGoodsRepository goodsRepository)
        {
            this.goodsRepository = goodsRepository;
        }

        public async Task<List<GoodsInfo>> AllAsync()
        {
            return await goodsRepository.AllAsync();
        }

        public async Task<GoodsInfo> GetAsync(int id)
        {
            var info = await goodsRepository.GetAsync(id);
            return info;
        }
    }
}
